home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / ATTN.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  81 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Attn( cMessage, aOptions, cColor, nRowMod, nColMod ) --> nChoice
  8.  
  9. PARAMETERS:
  10.  
  11. cMessage : Message to display
  12. aOptions : Array of Options to choose from
  13. cColor   : Color Scheme to use for box and text
  14.            (Default: setcolor())
  15. nRowMod  : Row Offset from Center (Default: 0)
  16. nColMod  : Col Offset from Center (Default: 0)
  17.  
  18. SHORT:
  19.  
  20. Replacement for Clipper's Alert() with additional control.
  21.  
  22. DESCRIPTION:
  23.  
  24. _Attn() is (with a few exceptions, and a few additions) is a replacement for
  25. the Clipper Alert() function, allowing for several options including color
  26. and positioning.  The syntax of alert() is compatible, however.  The only
  27. syntax differences come in the expanded capabilities (ie, arguments beyond
  28. cMessage and aOptions).
  29.  
  30. Differences from Alert(): No TTY-Mode drawing is used,  ie, standard
  31. @..Say..Get screen writing is employed.  _Attn() will allow more than four
  32. aOption elements (Alert() ignores any beyond the fourth).  _Attn() will
  33. ignore NIL and empty elements (Alert() acts strangely when NIL elements are
  34. given).
  35.  
  36.  
  37. Similarities to Alert(): if the number of lines in cMessage will not fit on
  38. the screen in the current screen mode, the results are unpredictable.
  39. _Attn() saves and restores it's screen area.
  40.  
  41.  
  42. cMessage may be omitted or specified as empty.  The result will be an box
  43. with only the aOptions choices and no message.
  44.  
  45. If the string contains semicolons, each string so delimited is centered
  46. on successive lines of the box.
  47.  
  48. aOptions is an array of strings to display as choices.  If not specified,
  49. a single "Ok" message is displayed (and obviously will always return 1).
  50. No checking is attempted to see if all options will fit across the screen.
  51. If you specify them, they're going up.
  52.  
  53.  
  54. cColor is a standard Clipper Color scheme string.  If it is not
  55. specified, them the current color setting is used.
  56.  
  57. nRowMod and nColMod are offsets from center.  That is, the box coordinates
  58. are first centered to fit the current screen mode, and then nRowMod
  59. and nColMod are ADDED to the TOP LEFT corner coordinates to move the
  60. box accordingly.  For instance, to move the box DOWN and/or to the
  61. RIGHT, specify a positive number. To move the box either UP or to the
  62. LEFT, specify negative values.
  63.  
  64.  
  65. _Attn(cMessage, aOptions, cColor, -5, -10): this would display the box
  66. five rows UP from center, and 10 columns LEFT from center.
  67.  
  68. NOTE:
  69.  
  70.  
  71.  
  72. EXAMPLE:
  73.  
  74. _Attn('Pick something from the list', {"This","That","The","Other","Else"},
  75. 'w+/b,n/w,,,gr+/g")
  76.  
  77. In this example, the row and column modifiers are not specified, so the
  78. _Attn() box is centered in the display screen.
  79.  
  80. ******************************************************************************/
  81.